package cn.com.api.mapper.base;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.*;

import cn.com.api.entity.ApiT_user_cash_records;

//DAO
public interface T_user_cash_recordsMapperBase {

	// 根据id查看
	@Select("SELECT * FROM T_USER_CASH_RECORDS  WHERE RECORD_ID = #{record_id}")
	public ApiT_user_cash_records findT_user_cash_recordsById(Integer record_id);

	// 查看数据集
	@Select("SELECT * FROM T_user_cash_records")
	public List<ApiT_user_cash_records> findT_user_cash_recordss();

	// 根据条件查看数据集
	public List<Map<String, Object>> findT_user_cash_recordssByMap(HashMap condition);

	// 添加
	@Insert("INSERT INTO T_USER_CASH_RECORDS (USER_ID, MONEY, TYPE, REMARK, CREATE_TIME,ORDER_ID,conn_id) VALUES (#{user_id}, #{money}, #{type}, #{remark}, #{create_time}, #{order_id},#{conn_id})")
	@Options(useGeneratedKeys = true, keyProperty = "record_id")
	public int insertT_user_cash_records(ApiT_user_cash_records t_user_cash_records);

	// 修改
	@Update("UPDATE T_USER_CASH_RECORDS SET USER_ID = #{user_id}, MONEY = #{money}, cate_type = #{cate_type}, REMARK = #{remark}, create_time = #{create_time}, ORDER_ID = #{order_id}, pay_type = #{pay_type}, pay_type_desc = #{pay_type_desc}, process_type = #{process_type},conn_id = #{conn_id},is_receive =#{is_receive} WHERE RECORD_ID = #{record_id}")
	public int updateT_user_cash_records(ApiT_user_cash_records t_user_cash_records);

	// 删除
	@Delete("DELETE FROM T_USER_CASH_RECORDS  WHERE RECORD_ID = #{record_id}")
	public int deleteT_user_cash_records(Integer record_id);

	// Foreign keys revelant

	// region Indexs revelant

}
